home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #14 / Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO / win_utl1 / ls_nt16.zip / LS.MAN < prev    next >
Text File  |  1996-01-28  |  7KB  |  158 lines

  1. LS(1)                   USER COMMANDS                     LS(1)
  2.  
  3. NAME
  4.      ls - list the contents of a directory.               [Version 1.6]
  5.  
  6. SYNOPSIS
  7.      ls [-aAcCdDFgGhIlLRrtuz1] file1 file2 ...
  8.  
  9. DESCRIPTION
  10.      ls is a command similar to DIR, which (under Windows NT) gives
  11.      additional information about files and directories such as owner,
  12.      group and permissions associated with each file and directory.
  13.  
  14.      The -l option shows information in long format. Output is divided
  15.      into several fields: the permissions field, the owner field, the
  16.      group field (showing all other users and groups who have been
  17.      granted specific rights to the file/directory), the file's size,
  18.      the modification date and its name:
  19.  
  20.     -rwxdr-x----- tomas      Users      43008 Aug 02 17:43 ls.exe
  21.     _____________ _____      _____      _____ ____________ ______
  22.     permissions   owner      group      size  mod.date     name
  23.  
  24.     
  25.      In addition, it is possible to add two more fields: the attribute field
  26.      (-z option) and DOS short file name (-D option).
  27.  
  28.  
  29.   Permissions Field
  30.      The permissions field, which is printed with the -l option on NTFS
  31.      file-systems, should be interpreted as follows:
  32.  
  33.      The first character shows the file type:
  34.           - = entry is a plain file
  35.           d = entry is a directory
  36.       t = entry is a temporary file
  37.           s = entry is a system file
  38.           c = entry is a compressed file
  39.  
  40.      The next 12 characters should be interpreted as three sets of four(!)
  41.      characters each. The first set refers to the owner's permissions; 
  42.      the next set shows access rights explicitly granted to other users
  43.      or groups; the last set refers to permissions for everyone else.
  44.      Within each set, the 4 fields indicate permission to read; to write;
  45.      to execute the file as a program; and to delete it (rwxd).
  46.      
  47.      It felt necessary to extend the Unix "ls" output format slightly since
  48.      NT interprets access-rights differently, i.e. an explicit delete right
  49.      can be assigned a file. (Upon request, I can add an option not to show
  50.      this entry.)
  51.      
  52.      The four letter positions in each set should be interpreted as follows.
  53.      In general, anything but the four lower-case letters "rwxd" indicates
  54.      that some kind of limitation applies:
  55.  
  56.     -------
  57.     1 | r  file is readable/directory is listable
  58.     -------
  59.       | w  write allowed, no restrictions
  60.       | W  write allowed but not append on files/directory allows file
  61.       |     creation only (no subdirs)
  62.     2 | a  only append allowed/directory allows subdir creation only
  63.       | *  the file is not writable, but ownership or protection
  64.       |      can be changed (this should be seen as a warning)
  65.       | =  the file is writable according to the access list, but the
  66.       |     read-only attribute prevents writing (see the -z flag)
  67.     -------
  68.     3 | x  file is executable/directory is traversable
  69.     -------
  70.       | d  delete is granted for this file or directory as well as for
  71.     4 |      all subdirectories
  72.       | D  delete is granted but not for subdirectories
  73.       | c  delete is only granted for subdirectories
  74.     -------
  75.  
  76.        The following two letters may also appear:
  77.       -  the indicated permission is not granted
  78.       ?  the indicated permission is not known by ls (only occurs in 
  79.            some rare cases when negative access rights are present)
  80.  
  81.  
  82.   Attribute Field
  83.      The attribute field replaces the permissions field on non NTFS file
  84.      systems. (It is also printed on NTFS file systems when -z option is
  85.      specified.) It contains the following 7 fields (characters):
  86.  
  87.       d = entry is a directory
  88.       s = entry is a system file
  89.       r = entry is read-only (see the ATTRIB command)
  90.       h = entry is hidden (ls needs -a option to show these files)
  91.       a = entry has the archive bit set
  92.       T = entry is a temporary file
  93.       c = entry is a compressed file / all files created in this dir will
  94.         be compressed
  95.  
  96.   Owner and group fields
  97.       The owner field shows the owner of the file. The group field shows
  98.       all(!) users and groups who are explicitly granted permission to
  99.       the file or the directory. (This interpretation differs from the POSIX
  100.       interpretation since POSIX groups are ignored by NT).
  101.       For example, if user A has permission to read a file (r), and user
  102.       B has permission to write (w), the group permission field will show
  103.       "rw--" and the group field shows "A,B".
  104.       
  105.       Thus, group permissions should be interpreted as a super-set of all
  106.       access rights EXPLICITLY given to other users on the system. Note that
  107.       all other users' rights are shown in the third set of the permissions
  108.       field. Also note that Administrator's and System's rights are not
  109.       included anywhere, i.e. they may have full access to all files even
  110.       if ls doesn't tell you!
  111.  
  112. OPTIONS
  113.      The following command-line options can be given to ls. ls will also
  114.      recognize these options if they are present in the environment variable
  115.      LSFLAGS which is useful when customizing output. 
  116.  
  117.      -a   List all entries; in the absence of this option,
  118.            hidden entries and . and .. do not show up
  119.      -A   Same as -a, except don't show  `.' and `..'
  120.      -c   Show creation time instead of last modification time
  121.      -C   Force multi-column output, with entries sorted down the
  122.            columns;  this is the default when output is to a terminal.
  123.      -1   Force one column output; this is the default when output is not
  124.        to a terminal.
  125.      -d   If argument is a directory, list only its name (not its contents);
  126.        often  used  with -l to get the status of a directory.
  127.      -D   Show MS-DOS short filenames (8+3 characters)
  128.      -F   Mark directories with a trailing slash /
  129.      -g   Show group ownership together with -l. See above for explanation.
  130.      -G   Same as -g, except that when group field becomes too long, only the
  131.        number of entries is shown, e.g. <10>. This makes the output
  132.        readable when many entries are present.
  133.      -h   Print version number and usage information
  134.      -I   Ignore case when sorting
  135.      -l   List in long format (required for many other options)
  136.      -L   Show names in lower case (non NTFS file-systems only)
  137.      -r   Reverse the order of sort to get reverse alphabetic or oldest first
  138.      -R   Recursively list subdirectories encountered
  139.      -t   Sort by time modified (latest first) instead of by name
  140.      -u   Show time for last access instead of last modification time
  141.      -z   Show DOS attributes
  142.  
  143.  
  144. BUGS
  145.      The ? output for owner protection should be removed. This involves
  146.      some work to check owner's group membership.
  147.  
  148. COPYRIGHT
  149.      This program can be freely distributed and used as long as it is not
  150.      sold or made part of any commercial product, and this coypright notice
  151.      and original author name accompanies the program. No responsibility
  152.      is taken for the program, for its output, correctness etc.
  153.  
  154. AUTHOR
  155.      Please send comments, suggestions and questions to
  156.      Tomas Olovsson  [olovsson@ce.chalmers.se]
  157.  
  158.